//
// Created by admin on 25-6-16.
//

#ifndef PERSON_H
#define PERSON_H



#include <iostream>
using namespace std;

class Parent{
public:
    Parent(int a = 0){
        this->a = a;
    }

    virtual void print(){
        cout << "i am parent" << endl;
    }
private:
    int a;
};

class Child : public Parent{
public:
    Child(int b = 0) :Parent(0){
        this->b = b;
    }

    virtual void print(){
        cout << "i am child" << endl;
    }
    ~Child()
    {
        cout<<" child exit "<<endl;
    }
private:
    int b;
};




#endif //PERSON_H
